
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

    <meta name="format-detection" content="telephone=no" />
    <title>男装专区</title>
    <link rel="stylesheet" type="text/css" href="/css/stroe/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/loading.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/base.css"/>
    <link rel="stylesheet" type="text/css" href="/css/stroe/style.css"/>
    <script src="/js/jquery/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script type="text/javascript">
        $(window).load(function(){
            $(".loading").addClass("loader-chanage");
            $(".loading").fadeOut(300);
        });
        $(function () {

            var users = sessionStorage.getItem("user");
            var user = JSON.parse(users);
            var params = getParams();
            if (params.id){
                $.get("/commoditys/"+params.id+"/details",function (data) {
                    $(".buys").renderValues(data,{
                        'setHref':function (item,value) {
                            $(item).attr("href", $(item).attr("href") + value);
                        }
                    });
                    $(".fixed-footer").renderValues(data)
                });
                $.get("/buys/"+user.id+"/address",function (data) {
                    $(".to-now").renderValues(data)
                });
                $("#shopping").click(function () {
                    $.post("/buys/"+params.id+"/"+user.id+"/"+1,function (data) {
                        if (data.success){
                            window.location.href = "/mine/store/storeHome.html";
                        }else {
                            $(document).dialog({
                                autoClose: 2500,
                                content: data.msg
                            });
                        }
                    })
                })
            }
        })
    </script>
</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<header class="top-header fixed-header">
    <a class="icona" href="javascript:history.go(-1)">
        <img src="/img/store/left.png"/>
    </a>
    <h3>去结算</h3>
    <a class="iconb" href="shopcar.html">
    </a>
</header>

<div class="contaniner fixed-cont">
    <section class="to-buy">
        <header>
            <div class="to-now">
                <div class="tonow">
                    <label for="tonow"  onselectstart="return false" ></label>
                    <input type="checkbox" id="tonow"/>
                </div>
                <dl>
                    <dt>
                        <b render-html="name">瑾晨</b>
                        <strong render-html="tel">13035059860</strong>
                    </dt>
                    <dd render-html="site">安徽省合肥市XXXXXXXX</dd>
                </dl>
                <h3><a href="go-address.html"><img src="/img/store/write.png"/></a></h3>
            </div>
        </header>
        <div class="buy-list buys">
            <ul>
                <a href="detail.html?id=" render-fun="setHref" render-key="id">
                    <figure>
                        <img render-src="picture"/>
                    </figure>
                    <li>
                        <h3 render-html="name">超级大品牌服装，现在够买只要998</h3>
                        <span render-html="color">
								颜色：经典绮丽款
								<br render-html="size"/>
								尺寸：M
							</span>
                        <b render-html="discountPrice">￥32.00</b>
                        <small>×1</small>
                    </li>
                </a>
            </ul>
            <dl>
                <dd>
                    <span>运费</span>
                    <small>包邮</small>
                </dd>
                <dd>
                    <span>商品总额</span>
                    <small render-html="discountPrice"></small>
                </dd>
                <dt>
                    <textarea rows="4" placeholder="给卖家留言（50字以内）"></textarea>
                </dt>
            </dl>
        </div>

    </section>
    <!--底部不够-->
    <div style="margin-bottom: 9%;"></div>
</div>

<footer class="buy-footer fixed-footer">
    <p>
        <small>总金额</small>
        <b render-html="discountPrice"></b>
    </p>

    <input type="button" value="去付款" id="shopping"/>
</footer>

<script type="text/javascript">
    $(".to-now .tonow label").on('touchstart',function(){
        if($(this).hasClass('ton')){
            $(".to-now .tonow label").removeClass("ton")
        }else{
            $(".to-now .tonow label").addClass("ton")
        }
    })
</script>
</body>
</html>